Skip to content

feat: parse indicated range to delimit hunks #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 13, 2025

Conversation

zelosleone
Copy link

closes prefix-dev/rattler-build#1819

issue was actually simpler than i thought. patch is a git-format-patch with 40 patches inside of it as 4 commits. we were not parsing git-metadata with "From" boundary, so we were failing to parse git-format-patches correctly. I also added another test to check if we could parse correctly if we encounter from with diff prefixes, just in case.

Comment on lines +3 to +7
use super::{Hunk, HunkRange, Line, ESCAPED_CHARS_BYTES, NO_NEWLINE_AT_EOF};
use crate::{
LineEnd,
patch::Diff,
utils::{LineIter, Text},
LineEnd,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zed auto organized these with rust-analyzer

@zelosleone
Copy link
Author

I think we should solve the lint issues in another pr, they are just too much

@wolfv wolfv changed the title feat: include From boundary to parse_header for unified git commit files feat: parse indicated range to delimit hunks Aug 13, 2025
@wolfv wolfv merged commit 857e4c3 into prefix-dev:master Aug 13, 2025
2 checks passed
@zelosleone zelosleone deleted the boundary branch August 13, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to parse patch for GitHub PR since v0.44.0
3 participants